<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@page import="elib.Osoba"%>
<%@page import="elib.Kierownik"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="shortcut icon" href="img/book.ico">
<link rel=stylesheet href="style.css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>e-Biblioteka</title>
</head>
<body>
	<%
	HttpSession sess1 = request.getSession();
	if (sess1 != null) {
		Osoba osoba = (Osoba) sess1.getAttribute("osoba");
		if (osoba == null || !(osoba instanceof Kierownik)) {
			response.sendRedirect("index.jsp?ses=invalid1");
		}
	}
	%>
	<center><a href="admin.jsp"><div class="top"></div></a></center>
	<div class="login"><%@include file="WEB-INF/logged.jsp" %></div>
	<div class="strona">
		<div class="lewo"><%@include file="WEB-INF/menu/menuAdmin.jsp" %></div>
		<%
		String strona = request.getParameter("page");
		if (strona != null) {
			if (strona.equals("books")) {%>
				<div class="srodek"><%@include file="WEB-INF/strony/bookSearch.jsp" %></div>
			<%}else if (strona.equals("hours")) {%>
				<div class="srodek"><%@include file="WEB-INF/strony/openHours.jsp" %></div>
			<%}else if (strona.equals("showres")) {%>
				<div class="srodek"><%@include file="WEB-INF/strony/showReservation.jsp" %></div>
			<%}else if (strona.equals("showrent")) {%>
				<div class="srodek"><%@include file="WEB-INF/strony/showRent.jsp" %></div>
			<%}else if (strona.equals("addBook")) {%>
				<div class="srodek"><%@include file="WEB-INF/strony/addBook.jsp" %></div>
			<%}else if (strona.equals("addUser")) {%>
				<div class="srodek"><%@include file="WEB-INF/strony/addUser.jsp" %></div>
			<%}else if (strona.equals("addWorker")) {%>
				<div class="srodek"><%@include file="WEB-INF/strony/addWorker.jsp" %></div>
			<%}else if (strona.equals("users")) {%>
				<div class="srodek"><%@include file="WEB-INF/strony/showUser.jsp" %></div>
			<%}else if (strona.equals("workers")) {%>
				<div class="srodek"><%@include file="WEB-INF/strony/showWorker.jsp" %></div>
			<%}else if (strona.equals("editKara")) {%>
				<div class="srodek"><%@include file="WEB-INF/strony/editKara.jsp" %></div>
			<%}else if (strona.equals("authors")) {%>
				<div class="srodek"><%@include file="WEB-INF/strony/authors.jsp" %></div>
			<%}else if (strona.equals("about")) {%>
				<div class="srodek"><%@include file="WEB-INF/strony/about.jsp" %></div>
			<%}else if (strona.equals("contact")) {%>
				<div class="srodek"><%@include file="WEB-INF/strony/contact.jsp" %></div>
			<%}%>
		<%}else{ %>
			<div class="srodek"><%@include file="WEB-INF/strony/news.jsp" %></div>
		<%}%>
	</div>
	<div class="box">
		<a href="admin.jsp?page=authors">Autorzy</a> | 
		<a href="admin.jsp?page=about">O projekcie</a> | 
		<a href="admin.jsp?page=contact">Kontakt</a>
	</div>
    <footer>Copyright &copy; 2013 — wszystkie prawa zastrzeżone</footer>
</body>
</html>